package cc.mrbird.system.domain;

import cc.mrbird.common.annotation.ExportConfig;
import cn.afterturn.easypoi.excel.annotation.Excel;
import org.hibernate.validator.constraints.NotBlank;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.util.Date;

@Table(name = "one_student")
public class OneStudent implements Serializable{


    @Id
    @GeneratedValue(generator = "JDBC")
    @Column(name = "id")
    private Long id;

    @Excel(name = "考生号")
    @Column(name = "oneStudentId")
    @NotBlank(message = "该字段不能为空")
    @Pattern(regexp = "^\\d{12}$", message = "考号必须12位")
    @ExportConfig(value = "考生号")
    private String oneStudentId;

    @Excel(name = "姓名")
    @NotBlank(message = "该字段不能为空")
    @Column(name = "name")
    @ExportConfig(value = "姓名")
    private String name;

    @Excel(name = "性别")
    @Column(name = "ssex")
    @ExportConfig(value = "性别")
    private String ssex;

    @Excel(name = "专业")
    @Column(name = "profession")
    @ExportConfig(value = "专业")
    private String profession;

    @Excel(name = "身份证号")
    @NotBlank(message = "该字段不能为空")
    @Pattern(regexp = "^[1-9]\\d{5}(18|19|([23]\\d))\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx]$", message = "身份证号验证错误")
    @Column(name = "idNumber")
    @ExportConfig(value = "身份证号")
    private String idNumber;

    @Excel(name = "收件人")
    @Column(name = "receiver")
    @ExportConfig(value = "收件人")
    private String receiver;

    @Excel(name = "收件人地址")
    @Column(name = "direction")
    @ExportConfig(value = "收件人地址")
    private String direction;

    @Excel(name = "收件人电话")
    @Column(name = "telephone")
    @NotBlank(message = "该字段不能为空")
    /*@Pattern(regexp = "^1[0-9]{10}$", message = "手机号输入错误")*/
    @ExportConfig(value = "收件人电话")
    private String telephone;

    @Excel(name = "分数")
    @Column(name = "score")
    @ExportConfig(value = "分数")
    private String score;

    @Excel(name = "毕业高中")
    @Column(name = "graduateAdd")
    @ExportConfig(value = "毕业高中")
    private String graduateAdd;

    @Excel(name = "备注")
    @Column(name = "note")
    @ExportConfig(value = "备注")
    private String note;

    @Column(name = "status")
    private String status;

    @Column(name = "userName")
    @ExportConfig(value = "操作人")
    private String userName;

    @Column(name = "createdTime")
    @ExportConfig(value = "创建时间", convert = "c:cc.mrbird.common.util.poi.convert.TimeConvert")
    private Date createdTime;

    @Column(name = "updatedTime")
    @ExportConfig(value = "修改时间", convert = "c:cc.mrbird.common.util.poi.convert.TimeConvert")
    private Date updatedTime;

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getOneStudentId() {
        return oneStudentId;
    }

    public void setOneStudentId(String oneStudentId) {
        this.oneStudentId = oneStudentId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSsex() {
        return ssex;
    }

    public void setSsex(String ssex) {
        this.ssex = ssex;
    }

    public String getProfession() {
        return profession;
    }

    public void setProfession(String profession) {
        this.profession = profession;
    }

    public String getIdNumber() {
        return idNumber;
    }

    public void setIdNumber(String idNumber) {
        this.idNumber = idNumber;
    }

    public String getReceiver() {
        return receiver;
    }

    public void setReceiver(String receiver) {
        this.receiver = receiver;
    }

    public String getDirection() {
        return direction;
    }

    public void setDirection(String direction) {
        this.direction = direction;
    }

    public String getTelephone() {
        return telephone;
    }

    public void setTelephone(String telephone) {
        this.telephone = telephone;
    }

    public String getScore() {
        return score;
    }

    public void setScore(String score) {
        this.score = score;
    }

    public String getGraduateAdd() {
        return graduateAdd;
    }

    public void setGraduateAdd(String graduateAdd) {
        this.graduateAdd = graduateAdd;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Date getCreatedTime() {
        return createdTime;
    }

    public void setCreatedTime(Date createdTime) {
        this.createdTime = createdTime;
    }

    public Date getUpdatedTime() {
        return updatedTime;
    }

    public void setUpdatedTime(Date updatedTime) {
        this.updatedTime = updatedTime;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }
}
